package com.xyht.sca_s.student_manage_system.modules.welcomeNewStudent.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 收费类别详情表
 * </p>
 *
 * @author XYHT
 * @since 2024-01-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sms_wns_charge_category_detail")
@ApiModel(value = "SmsWnsChargeCategoryDetail对象", description = "收费类别详情表")
public class SmsWnsChargeCategoryDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "收费类别详情id")
    private String id;

    @ApiModelProperty(value = "收费类别id")
    private String categoryId;

    @ApiModelProperty(value = "收费类别顺序")
    private Integer categorySort;

    @ApiModelProperty(value = "收费类别详情名")
    private String name;

    @ApiModelProperty(value = "收费类别详情详细描述，说明操作内容和要求")
    private String description;

    @ApiModelProperty(value = "顺序，用于排列收费类别的先后次序")
    private Integer sort;

    @ApiModelProperty(value = "是否有默认价格")
    private Boolean hasDefaultPrice;

    @ApiModelProperty(value = "默认价格")
    private BigDecimal defaultPrice;

    @ApiModelProperty(value = "是否必须缴纳")
    private Boolean isNecessary;

    @ApiModelProperty(value = "是否可修改")
    private Boolean isModified;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "是否删除：0：未删除 1：已删除")
    @TableLogic
    private Integer isDeleted;

    // 构造器
    public SmsWnsChargeCategoryDetail() {
    }

    public SmsWnsChargeCategoryDetail(String categoryId, Integer categorySort, String name, Integer sort) {
        this.categoryId = categoryId;
        this.categorySort = categorySort;
        this.name = name;
        this.description = name;
        this.sort = sort;
        this.hasDefaultPrice = false; // 无默认价格
        this.isNecessary = true; // 必缴
        this.isModified = false; // 不可修改
    }


}
